#ifndef __CFILE_H__ 
#define __CFILE_H__ 

#include <stdio.h>
#include "WinToLinux.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

class CFile {
public:
	CFile(void);
	~ CFile(void);         // 析构函数
    int Open(CString path, int flag);
    int Open(CString path, int flag, mode_t mode);
    int Write(unsigned char *data,	unsigned int length);
    int Read(unsigned char *data,	unsigned int length);
    void Close()const;
    int GetLength()const;
private:
	int   cfile_fd;    // 用于保存字符串
};
#endif

